<h4 class="alert_info">{#welcome#}</h4>

<article class="module width_full">
    <header><h3><div style="float:left; width:100px;">{#Stats#}</div><div style="float:right; width:150px;">{#gameserver#}: {$gameserver}</div><div style="float:right; width:150px;">{#loginserver#}: {$loginserver}</div></h3></header>
    <div class="module_content">
        <article class="stats_overview" style="width:100% !important;">
            <div class="overview_today">
                <p class="overview_type">{#accounts#}</p>
                <p class="overview_count">{$all_users}</p>
                <p class="overview_type">{#characters#}</p>
                <p class="overview_count">{$all_players}</p>
            </div>
            <div class="overview_previous">
                <p class="overview_type">{#online#}</p>
                <p class="overview_count">{$online_players}</p>
                <p class="overview_type">{#offline#}</p>
                <p class="overview_count">{$offline_players}</p>
            </div>
            <div class="overview_previous">
                <p class="overview_type">{#active#}</p>
                <p class="overview_count">{$activated}</p>
                <p class="overview_type">{#banned#}</p>
                <p class="overview_count">{$banned}</p>
            </div>
        </article>
        <div class="clear"></div>
    </div>
</article>
		<article class="module width_full" style="">
			<header><h3 class="tabs_involved" style="text-transform:none; padding-left:10px;" >{#userlogs#}</h3>
				<ul class="tabs">
					<li><a href="#tab1">{#donate#}</a></li>
					<li><a href="#tab2">{#admin#}</a></li>
				</ul>
			</header>

			<div class="tab_container">
				<div id="tab1" class="tab_content">
					<table class="tablesorter" cellspacing="0"> 
						<thead> 
							<tr> 
								<th>{#username#}</th> 
								<th>{#adminname#}</th> 
								<th>{#timestamp#}</th>
								<th>{#reason#}</th> 
								<th>{#coins#}</th> 
								<th>{#amount#}</th> 
							</tr> 
						</thead> 
						<tbody> 
							{if !empty($value)}
							{foreach from=$value item=item}
								<tr>
									<td><a href="index.php?mod=profile&userID={$item.userID}">{$item.username}</a></td>
									<td><a href="index.php?mod=profile&userID={$item.admin}">{$item.adminname}</a></td>
									<td>{$item.timestamp}</td>
									<td>{$item.reason}</td>
									<td>{$item.coins}</td>
									<td>{$item.amount}</td>
								</tr>
							{/foreach}
							{else}
								<tr>
									<td colspan="6">{#nodonation#}</td>
								</tr>
							{/if}
						</tbody> 
					</table>
				</div>
				<div id="tab2" class="tab_content">
					<div id="tablewrapper">
						<div id="tableheader" style="display:none;">
							<div class="search">
								<select id="columns" onchange="sorter.search('query')">
						  <option value="-1">{#columns#}</option>
						  </select>
								<input type="text" id="query" onkeyup="sorter.search('query')" />
							</div>
						<span class="details">
						  <div>{#entries#} <span id="startrecord"></span>-<span id="endrecord"></span> {#from#} <span id="totalrecords"></span></div>
						  <div><a href="javascript:sorter.reset()">{#reset#}</a></div>
						</span>
					  </div>
					<table cellpadding="0" cellspacing="0" id="table" class="tinytable" style="width:100%;" >
						<thead>
							<tr>
								<th><h3>{#username#}</h3></th> 
								<th><h3>{#timestamp#}</h3></th>
								<th><h3>{#reason#}</h3></th> 
							</tr>
						</thead>
						<tbody>
						{if !empty($gmvalue)}
						{foreach from=$gmvalue item=item}
							<tr>
								<td><a href="index.php?mod=profile&userID={$item.id}" target="_blank">{$item.username}</a></td>
								<td>{$item.timestamp}</td>
								<td>{$item.message}</td>
							</tr>
						{/foreach}
						{else}
							<tr>
								<td colspan="3">{#nologs#}</td>
							</tr>
						{/if}
					   </tbody>
					</table>
					  <div id="tablefooter" style="display:none;">
						<div id="tablenav">
						  <div>
							<img src="layouts/images/icons/first.gif" alt="First Page" onclick="sorter.move(-1,true)" />
							<img src="layouts/images/icons/prev.gif" alt="First Page" onclick="sorter.move(-1)" />
							<img src="layouts/images/icons/next.gif" alt="First Page" onclick="sorter.move(1)" />
							<img src="layouts/images/icons/last.gif" alt="Last Page" onclick="sorter.move(1,true)" />
						  </div>
						  <div>
							<select id="pagedropdown"></select>
						  </div>
						  <div class="page">
							<a href="javascript:sorter.showall()">{#see_all#}</a>
						  </div>
						</div>
						<div id="tablelocation">
						  <div>
							<select onchange="sorter.size(this.value)">
							  <option value="5">5</option>
							  <option value="10" selected="selected">10</option>
							  <option value="20">20</option>
							  <option value="50">50</option>
							  <option value="100">100</option>
							</select>
							<span>{#entries_p_site#}</span>
						  </div>
						  <div class="page">{#site#} <span id="currentpage"></span> {#from#} <span id="totalpages"></span></div>
							</div>
						</div>
					</div>

				</div>
			</div>

		</article>
{literal}
    <script src="http://api.jquery.com/scripts/events.js"></script>

<script type="text/javascript">
$("#target").keypress(function(event) {
  if ( event.which == 13 ) {
     alert("test");
   }
   xTriggered++;
   var msg = "Handler for .keypress() called " + xTriggered + " time(s).";
  $.print( msg, "html" );
  $.print( event );
});
function sendMessage()
{
     $.ajax({
          type: "POST",
          url: "_modules/home/shoutbox.php",      
          async: false,
          data: "message="+$(".myMessage").val(),
           success: function(msg){
                refreshChat();
                $(".myMessage").val("");
           }
      });
}
function refreshChat()
{
      $.ajax({
          type: "POST",
          url: "_modules/home/shoutbox.php",
           success: function(msg){
                $("#shoutbox").html(msg);
           }
      });
}
window.setInterval("refreshChat()",1000);
</script>
{/literal}      {literal}
<script>
$("#myMessage").keypress(function(event) {
  if ( event.which == 13 ) {
      alert("enter gedrückt!");
     event.preventDefault();
   }
});

</script>
 {/literal}
<article class="module width_full">
    <header><h3>{#shoutbox#}</h3></header>
    <div class="message_list">
        <div class="module_content" style="margin:10px 4px !important;" id="shoutbox">
        </div>
    </div>
    <footer>
     <div class="post_message">
      <input type="text" value="{#message#}" class="myMessage" id="myMessage" onfocus="{literal}if(!this._haschanged){this.value=''};this._haschanged=true;{/literal}">
      <input type="submit" class="alt_btn" value="{#submit#}" onclick="sendMessage();">
     </div>
    </footer>
</article>

      {literal}
<script>
$("#myMessage").keypress(function(event) {
  if ( event.which == 13 ) {
      sendMessage();
   }
});


    var sorter = new TINY.table.sorter('sorter','table',{
      headclass:'head',
      ascclass:'asc',
      descclass:'desc',
      evenclass:'evenrow',
      oddclass:'oddrow',
      evenselclass:'evenselected',
      oddselclass:'oddselected',
      paginate:true,
      size:10,
      colddid:'columns',
      currentid:'currentpage',
      totalid:'totalpages',
      startingrecid:'startrecord',
      endingrecid:'endrecord',
      totalrecid:'totalrecords',
      hoverid:'selectedrow',
      pageddid:'pagedropdown',
      navid:'tablenav',
      sortcolumn:1,
      sortdir:1,
      init:true
    });
    </script>
    {/literal}